package com.bjdd.jdy.ui.commitCard;

import com.bjdd.jdy.base.BaseModel;
import com.bjdd.jdy.base.BasePresenter;
import com.bjdd.jdy.base.BaseResult;
import com.bjdd.jdy.base.BaseView;
import com.bjdd.jdy.entity.ProvinceBean;
import com.bjdd.jdy.entity.ToolBean;
import com.bjdd.jdy.entity.User;
import com.bjdd.jdy.ui.MainContract;

import java.util.List;
import java.util.Map;

import okhttp3.RequestBody;
import rx.Observable;

/**
 * Created by Administrator on 2017/4/10.
 */

public interface CommitContract {
    interface Model extends BaseModel {
        Observable<BaseResult<String>> getCommitModel(String token, Map<String,String> params,Map<String,RequestBody> photos);
        Observable<BaseResult<List<ProvinceBean>>> getAreaModel(String token);
        Observable<BaseResult<List<ToolBean>>> getTools(String token);
    }

    interface View extends BaseView {
        void commitSuccess(BaseResult result);
        void commitFailer(BaseResult result);
        void setArea(List<ProvinceBean> citys);
        void setTools(List<ToolBean> tools);
    }

    abstract class Presenter extends BasePresenter<CommitContract.Model,CommitContract.View> {
        public abstract void commit(String token,Map<String,String> params,Map<String,RequestBody> photos);
        public abstract void getArea(String token);
        public abstract void getTools(String token);
    }
}
